<?php query_posts( "post_type=slideshow&post_status=publish&order=ASC&orderby=menu_order&posts_per_page=-1&" ); ?>
<div class="slider-wrapper theme-default">
		<div id="slider" class="nivoSlider">
<?php while ( have_posts(  ) ) : the_post(  ); ?>
<?php 
$links = get_post_custom_values( 'link_url' );

if ( sizeof( $links ) ) {$strLink = '<a href="'.$links[0].'">';}

if ( has_post_thumbnail(  ) ) { // check if the post has a Post Thumbnail assigned to it.
	if ( $strLink ) {
		echo $strLink;
		the_post_thumbnail( 'slider-post-thumbnail' );
		echo '</a>';
	}
	else
		the_post_thumbnail( 'slider-post-thumbnail' );	
} 
?>
<?php endwhile; ?>
	</div>
</div>
<?php wp_reset_query(  );?>